<?php
namespace app\manage\model;
/**
 * Created by PhpStorm.
 * User: junyv
 * Date: 2016/9/18
 * Time: 10:36
 */
class Help extends \think\Model
{
    protected $autoWriteTimestamp = true;
    protected $insert = ['editor','editor_id'];
    public function linkmenu(){
        return $this->hasOne('linkmenu','id','cate_id',[],'left');
    }
    protected function setTagsAttr($value){
        return str_replace('，',',',$value);
    }
    protected function setEditorIdAttr()
    {
        $info = session('adminInfo');
        return $info['id'];
    }
    protected function setEditorAttr()
    {
        $info = session('adminInfo');
        return $info['username'];
    }

}